#include "Point.h"
#include <iostream>
using namespace std;

int main(int argc, char **argv)
{
	Point p(3,4);
	cout << "p: ";
	//p.display();
	cout << p << endl;			//operator << (cout, p);
	//cin >> p;					//operator >> (cin, p)

	//operator << (p, cout);-----> p << cout;

	Point p1 = Point(1,8);
	cout << "p1: ";
	p1.display();

	Point p2 = p + p1;
	cout << "p2: ";
	p2.display();		//(4, 12)

	cout << "前++" << endl;
	Point p3 = ++p2;				//p2: (5, 13) p3: (5, 13)
	cout << "p2: ";
	p2.display();
	cout << "p3: ";
	p3.display();

	//p2: (5, 13)
	cout << "后++" << endl;
	p2++;
	cout << "p2: ";
	p2.display();		//(6, 14)
	
	Point p4 = p2++;
	cout << "p2: ";
	p2.display();			//(7, 15)
	cout << "p4: ";
	p4.display();			//(6, 14)

/*
	int x = 3;
	x++;		//++x

	printf("x++: %d\n", x++);
	//4
	printf("++x: %d\n", ++x);
*/
	return 0;
}

